﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RuoYi.Framework.DependencyInjection
{
    //
    // 摘要:
    //     This service is equivalent of the Volo.Abp.DependencyInjection.ITransientCachedServiceProvider.
    //     Use Volo.Abp.DependencyInjection.ITransientCachedServiceProvider instead of this
    //     interface, for new projects.
    public interface IAbpLazyServiceProvider : ICachedServiceProviderBase, IKeyedServiceProvider, IServiceProvider
    {
        //
        // 摘要:
        //     This method is equivalent of the GetRequiredService method. It does exists for
        //     backward compatibility.
        T LazyGetRequiredService<T>();

        //
        // 摘要:
        //     This method is equivalent of the GetRequiredService method. It does exists for
        //     backward compatibility.
        object LazyGetRequiredService(Type serviceType);

        //
        // 摘要:
        //     This method is equivalent of the GetService method. It does exists for backward
        //     compatibility.
        T? LazyGetService<T>();

        //
        // 摘要:
        //     This method is equivalent of the GetService method. It does exists for backward
        //     compatibility.
        object? LazyGetService(Type serviceType);

        //
        // 摘要:
        //     This method is equivalent of the Volo.Abp.DependencyInjection.ICachedServiceProviderBase.GetService``1(``0)
        //     method. It does exists for backward compatibility.
        T LazyGetService<T>(T defaultValue);

        //
        // 摘要:
        //     This method is equivalent of the Volo.Abp.DependencyInjection.ICachedServiceProviderBase.GetService(System.Type,System.Object)
        //     method. It does exists for backward compatibility.
        object LazyGetService(Type serviceType, object defaultValue);

        //
        // 摘要:
        //     This method is equivalent of the Volo.Abp.DependencyInjection.ICachedServiceProviderBase.GetService(System.Type,System.Func{System.IServiceProvider,System.Object})
        //     method. It does exists for backward compatibility.
        object LazyGetService(Type serviceType, Func<IServiceProvider, object> factory);

        //
        // 摘要:
        //     This method is equivalent of the Volo.Abp.DependencyInjection.ICachedServiceProviderBase.GetService``1(System.Func{System.IServiceProvider,System.Object})
        //     method. It does exists for backward compatibility.
        T LazyGetService<T>(Func<IServiceProvider, object> factory);
    }
}
